<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="../template.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:t="http://myfaces.apache.org/tomahawk">

	<ui:define name="conteudo">		
		<a4j:keepAlive beanName="varaBean"/>
		
		<div style="width: 700px">
			<div style="float:left">
				<h2 style="margin: 0px">
					<h:outputText value="#{msg['vara.titulo.cadastrar']}" rendered="#{varaBean.vara.id == null}"/>
					<h:outputText value="#{msg['vara.titulo.editar']}" rendered="#{varaBean.vara.id != null}"/>
				</h2>
			</div>
		</div>
		
		<div style="height: 50px"></div>

		<rich:messages id="mensagemErro" layout="list" style="color: red; font-weight: bold;"/>
	                
		<h:panelGrid columns="2">
		
			<h:outputLabel value="#{msg['geral.nome']}" />
			<h:inputText value="#{varaBean.vara.nome}" size="35"/>
			
		</h:panelGrid>
		
		<div style="height: 20px"></div>
		
		<div>
			<h:commandButton value="#{msg['geral.salvar']}" action="#{varaBean.salvar}" />
			<h:commandButton value="#{msg['geral.cancelar']}" action="manterVara"/>
		</div>		
	</ui:define>
</ui:composition>